using MediatR;
using Movies.Application.DTOs;
using Movies.Application.Responses;
using Movies.Core.Entities;

namespace Movies.Application.Extensions;

public static class GetMoviesByMovieNameExtension
{
    public static GetMovieDto MapTo(this Movie movie)
    {
        return new GetMovieDto
        {
            Id = movie.Id,
            MovieName = movie.MovieName,
            DirectorName = movie.DirectorName,
            ReleaseYear = movie.ReleaseYear,
        };
    }
}
